import os
lt=['张三','李四','王麻子']
fp= open('file.text','w',encoding='utf-8')

fp.write(lt[0]+'\n')
fp.write(lt[1]+'\n')
fp.write(lt[2]+'\n')
fp.close()










